<template>
    <div class="back-top" @click="backTop">
    </div>
</template>

<script>
    // 回到顶部组件
    import {defineComponent} from "vue"
    export default defineComponent({
        setup(props,{emit}) {
            return {
                backTop:()=>{
                    emit('goTop')
                }
            }
        }
    })
</script>

<style scoped>
.back-top{
    background: url('~assets/images/up.png') #fcfcfc no-repeat center center;
    width: 40px;
    height: 40px;
    position: fixed;
    bottom: 80px;
    right: 30px;
    z-index: 20;
    box-shadow: 5px 5px 5px #88888;
    border-radius: 50%;
    cursor: pointer;
}
</style>
